Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pycasbin adopter and test. #164

Merged
merged 2 commits into from
Nov 13, 2021
Merged

feat: add pycasbin adopter and test. #164

merged 2 commits into from
Nov 13, 2021

Conversation

sheny1xuan
Copy link
Contributor

@sheny1xuan sheny1xuan commented Nov 5, 2021

Description

  • I acciently delete this branch and close the pr.
  • First commit
    • Fix FileAdapter.SavePolicy()
    • Add a new FileAdapter interface to use in python like casbin::Config.
    • Fix ArrayToString(const std::vector<std::string>& arr)
      • arr usually be a line of policy keys without p or g, (e.g. arr = {"alice", "data1", "read"}).
      • Before ArrayToString(const std::vector<std::string>& arr), arr will return alice, alice, data1, read. alice will generate twice.
  • Second commit
    • Add pycasbin file adopter and test.

Signed-off-by: stonex <1479765922@qq.com>
@casbin-bot
Copy link
Member

@EmperorYP7 @divy9881 @noob20000405 please review

@hsluoyz
Copy link
Member

hsluoyz commented Nov 5, 2021

@EmperorYP7 please review

tests/python/test_adapter.py Outdated Show resolved Hide resolved
Signed-off-by: stonex <1479765922@qq.com>
@sheny1xuan
Copy link
Contributor Author

@EmperorYP7 please review.

Copy link
Member

@EmperorYP7 EmperorYP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EmperorYP7 EmperorYP7 merged commit 4371da5 into casbin:master Nov 13, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.40.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants